import React from 'react'
import Header from './Header/Header'
import Section from './Section/Section'

import './index.css'
class GithubSearch extends React.Component {
    state = {
        users : [],
        isFirst:true,
        isLoading:false,
        err: ''
    }
    saveUsers = (stateObj) => {
        console.log(stateObj)
        this.setState(stateObj)
    }
    render() {
        return (
            <div className="container">
                <Header saveUsers = {this.saveUsers}></Header>
                <Section {...this.state}></Section>
            </div>
        )
    }
}

export default GithubSearch